package com.sw.entity.impl;

import com.sw.entity.Entity;
import com.sw.vo.UserInfoVO;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @project: com.sw.entity
 * @author: Szh
 * @date: 2023/9/19 19:22
 */
@Data
public class SysUser implements Entity<UserInfoVO> {
    private String id;
    private String loginName;
    private String password;
    private String name;
    private String email;
    private String phone;
    private String loginIp;
    private LocalDateTime loginDate;
    private LocalDateTime createDate;
    private LocalDateTime updateDate;
    private String delFlag;
    private String roleId;
    private Integer status;
    private String defaultData;

    @Override
    public UserInfoVO conversion() {
        UserInfoVO userInfoVO = new UserInfoVO();
        userInfoVO.setId(id);
        userInfoVO.setLogin_name(loginName);
        userInfoVO.setPassword(password);
        userInfoVO.setName(name);
        userInfoVO.setEmail(email);
        userInfoVO.setPhone(phone);
        userInfoVO.setLogin_ip(loginIp);
        userInfoVO.setLogin_date(loginDate);
        userInfoVO.setCreate_date(createDate);
        userInfoVO.setUpdate_date(updateDate);
        userInfoVO.setDel_flag(delFlag);
        userInfoVO.setStatus(status);
        return userInfoVO;
    }
}
